#pragma  once

class StyledTextContent {
public:
	virtual size_t GetCharCount() = 0;
	virtual String GetLine(size_t lineIndex) = 0;
	virtual size_t GetLineAtOffset(size_t offset) = 0;
	virtual size_t GetLineCount() = 0;
	virtual String GetLineDelimiter() = 0;
	virtual size_t GetOffsetAtLine(size_t lineIndex) = 0;
	virtual String GetTextRange(size_t start, size_t length) = 0;
	virtual void ReplaceTextRange(size_t start, size_t replaceLength, const String& text) = 0;
	virtual void SetText(const String& text) = 0;
};



class TextChangingData {
public:
	TextChangingData(StyledTextContent* content_ = 0);
	virtual ~TextChangingData(){};
public:
	StyledTextContent* content;

	size_t start;
	size_t replaceLineCount;
	String text;
	size_t newLineCount;
	size_t replaceCharCount;
	size_t newCharCount;
};
class TextChangedData {
public:
	TextChangedData(StyledTextContent* content_ = 0);
	virtual ~TextChangedData(){};
public:
	StyledTextContent* content;
};
class TextSetData {
public:
	TextSetData(StyledTextContent* content_ = 0);
	virtual ~TextSetData(){};
public:
	StyledTextContent* content;
};